/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 29489
 * Date: 2023-03-15
 * Time: 22:28
 */
public class MyArrays {
    public MyArrays(){}
    public MyArrays(int array[]){
        _array = array;
    }

    public static void printArray(int array[]){
        for(int i = 0; i < array.length - 1; ++i){
            System.out.print(array[i]+",");
        }
        System.out.println(array[array.length-1]);
    }
    public static void sortArray(int array[]){
        for(int i = 0; i < array.length-1; ++i)
            for(int j = i+1; j < array.length; ++j){
                if(array[i] > array[j])
                {
                    int tmp = array[i];
                    array[i] = array[j];
                    array[j] = tmp;
                }
            }
    }
    public static int sumOfArray(int array[]){
        int sum = 0;
        for(int i = 0; i < array.length; ++i)
            sum += array[i];
        return sum;
    }

    private int _array[];
}
